<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

	<table class="table">
		<tr>
			<th>课程</th><th>成绩</th>
		</tr>
		<c:forEach items="${student.grades}" var="c">
			<tr>
				<td>${c.course.courseName}</td>
				<td>
				   	<input type="text" onchange = "changecj(this.value, ${c.id})" name="grade" class="form-control" placeholder="成绩" value="${c.grade }">
				</td>
			</tr>
		</c:forEach>
	</table>

	
<script type="text/javascript">
function changecj(grade, id){
	$.post("../grade/updata1?grade="+grade+"&id="+id);
}
</script>